package com.rd.student.jiaji.class4.suyan.zrrd.day12;

public class Demo {
    public static void main(String[] args) {
        Person p=new Chinese();
        p.eat();
        Person p1=new Person() {
            @Override
            public void eat() {
                System.out.println("可以用筷子，可以用刀叉，可能吃牛排");
            }
        };
        p.eat();
    }

}

abstract class Person{
    public abstract void eat();
}

class Chinese extends Person{


    @Override
    public void eat() {
        System.out.println("用筷子，吃饺子");
    }
}

